package com.wfw.client.config;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.cloud.netflix.eureka.EnableEurekaClient;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@SpringBootApplication
@EnableEurekaClient
@RefreshScope
@RestController
public class WfwServerConfigApplication {

	public static void main(String[] args) {
		new SpringApplicationBuilder(WfwServerConfigApplication.class).run(args);
	}

	@Value("${info}")
	String info;

	@RequestMapping("/")
	public String home() {
		return "Hello world";
	}
	@RequestMapping("/info")
	public String from() {
		return info;
	}
}
